const NODE_ENV = process.env.NODE_ENV === "development"?"development":"production";
const _import = require('./_import_' + NODE_ENV)
const routes = [
    {
        name: 'Home',
        path: '/',
        title: '首页',
        component: _import('home/home'),
    },
    {
        name: 'GoodsList',
        path: '/goods/list',
        title: '商品列表',
        component: _import('goods/list'),
    },
    {
        name: 'GoodsAdd',
        path: '/goods/add',
        title: '发布商品',
        component: _import('goods/details'),
    },
    {
        name: 'GoodsCompile',
        path: '/goods/compile/:id',
        title: '编辑商品',
        component: _import('goods/details'),
    },
    {
        name: 'Category',
        path: '/goods/category',
        title: '商品分类',
        component: _import('goods/category'),
    },
    {
        name: 'Brand',
        path: '/goods/brand',
        title: '商品品牌',
        component: _import('goods/brand'),
    },
    {
        name: 'Adver',
        path: '/market/adver_list',
        title: '广告列表',
        component: _import('market/adver_list'),
    },
    {
        name: 'AdverAdd',
        path: '/market/adver_add',
        title: '新增广告',
        component: _import('market/adver_details'),
    },
    {
        name: 'AdverCompile',
        path: '/market/adver_compile/:id',
        title: '编辑广告',
        component: _import('market/adver_details'),
    }
]

export default routes